]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: sort connections by name only
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 8 Feb 2014 13:33:32 +0000 (14:33 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 17 Feb 2014 19:44:57 +0000 (20:44 +0100)
We don't watch for timestamp changes, and sorting by name keeps
the order consistent and predictable. In practice, there should
be at most 3 or 4 elements, so the user will always read all them
at once and sorting is irrelevant.

https://bugzilla.gnome.org/show_bug.cgi?id=723570

js/ui/status/network.js

index 5e9d478cf5794af3aa9d545c7210ae01ceb63350..ff536d072b5afc63c3c4870ad64e0f9b39a2bfd8 100644 (file)
@@ -249,10 +249,7 @@ const NMConnectionSection = new Lang.Class({
     },
 
     _connectionSortFunction: function(one, two) {
-        if (one._timestamp == two._timestamp)
-            return GLib.utf8_collate(one.get_id(), two.get_id());
-
-        return two._timestamp - one._timestamp;
+        return GLib.utf8_collate(one.get_id(), two.get_id());
     },
 
     _makeConnectionItem: function(connection) {
@@ -1788,7 +1785,6 @@ const NMApplet = new Lang.Class({
         let connectionSettings = connection.get_setting_by_name(NetworkManager.SETTING_CONNECTION_SETTING_NAME);
         connection._type = connectionSettings.type;
         connection._section = this._ctypes[connection._type] || NMConnectionCategory.INVALID;
-        connection._timestamp = connectionSettings.timestamp;
 
         let section = connection._section;